package com.ply.flashsalessystem.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ply.flashsalessystem.entity.pojo.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ply.flashsalessystem.entity.vo.manage.GoodsVO;
import com.ply.flashsalessystem.entity.wrapper.GoodsWrapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XiaoPan
 * @since 2022-03-23
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    Page<GoodsVO> queryGoodsAllPage(Page<GoodsVO> goodsPage, @Param("gq") GoodsWrapper goodsWrapper);

    int updatePutAway(@Param("goodId") Integer goodId,
                      @Param("doAway") Integer doAway);

    int updateNums(@Param("goodId") Integer goodsId,
                   @Param("nums") double nums);

}
